﻿@using BonjourQuotation.UI.Models.AccountModel
@model ToolTabColumnPermisionsCanViewCanEditGridViewModel

@if (Model.Message != null)
{
    @Html.LabelForModel(Model.Message)
}
@Html.HiddenFor(model => model.UserID)
@Html.HiddenFor(model => model.ToolTabID)
@Html.HiddenFor(model => model.ToolID)
<div class="row form-row" style="height:138px"></div>
    <div style="width: 581px; min-height: 20px; max-height: 360px; margin: auto; padding-top: 10px; padding-bottom: 10px; ">
    <table class="table table-bordered table-hover table-condensed" style="margin-bottom: -1px !important; width: 560px; background-color: white;">
        <tr>
            <th width=68%; class="GridHeaders">Tool Tab Column Name</th>
            <th width=16%; class="GridHeaders AllowViewth label_pointercursor">
                <span class="table_inputs_120">Allow View</span>
                <input type="checkbox" class="table_inputs_checkbox" name="AllowViewCheckbox" id="AllowViewCheckbox">
            </th>
            <th width=16%; class="GridHeaders AllowEditth label_pointercursor">
                <span class="table_inputs_120">Allow Edit</span>
                <input type="checkbox" class="table_inputs_checkbox" name="AllowEditCheckbox" id="AllowEditCheckbox">
            </th>
        </tr>
    </table>
    <div style="height:310px; overflow-y:auto">
        <table class="table table-bordered table-hover table-condensed" style="width: 560px; table-layout: fixed; background-color: white;">
            <tbody>
                @for (int ind = 0; ind < Model.Rows.Count; ind++)
                {
                <tr>
                    <td width=68%;>
                        @Html.LabelForModel(Model.Rows[ind].SelectedToolTabColumnName, new { @class = "table_inputs_370 table_inputs_WithoutBox" })
                        @Html.HiddenFor(model => Model.Rows[ind].SelectedToolTabColumnID, new { @class = "LineNoChangeDropHide" })
                    </td>
                    <td width=16% style="text-align:center">
                        @if (!(Model.Rows[ind].SelectedToolTabColumnName == "Create Gir Group" || Model.Rows[ind].SelectedToolTabColumnName == "Create Group Series"))
                        { 
                            @Html.CheckBoxFor(model => Model.Rows[ind].CanView, new { @class = "table_inputs_checkbox CanView CanViewChange ToolElemnetsChange CheckBox" })
                        }
                    </td>
                    <td width=16% style="text-align:center">
                        @if (!(Model.Rows[ind].SelectedToolTabColumnName == "Download Proposal" || Model.Rows[ind].SelectedToolTabColumnName == "Upload Proposal"
                            || Model.Rows[ind].SelectedToolTabColumnName == "New Button" || Model.Rows[ind].SelectedToolTabColumnName == "Save Button"
                            || Model.Rows[ind].SelectedToolTabColumnName == "SaveAs Button" || Model.Rows[ind].SelectedToolTabColumnName == "Preview Button"))
                        { 
                            @Html.CheckBoxFor(model => Model.Rows[ind].CanEdit, new { @class = "table_inputs_checkbox CanEdit ToolElemnetsChange CheckBox" })
                        }
                    </td>
                </tr>
                }
            </tbody>
        </table>
    </div>
</div>
<div class="SaveCancelDiv">
    <button class="btn14 btn50" type="button" onclick="$('#cboxClose').click()">Cancel</button>
    <button class="btn14 btn50" type="button" id="ToolTabColumnPermissionsSaveBtn">Save</button>
</div>
